package com.achievo.know.application.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.achievo.know.application.SystemConfigApplication;
import com.achievo.know.domain.SystemConfig;
import com.achievo.know.domain.SystemConfigRepository;
@Service
public class SystemConfigApplicationImpl implements SystemConfigApplication {

	@Autowired
	private SystemConfigRepository systemConfigRepository;

	public SystemConfigRepository getSystemConfigRepository() {
		return systemConfigRepository;
	}

	public void setSystemConfigRepository(
			SystemConfigRepository systemConfigRepository) {
		this.systemConfigRepository = systemConfigRepository;
	}

	@Override
	public SystemConfig getConfig() {
		return systemConfigRepository.get(1L);
	}

	@Override
	@Transactional
	public void save(SystemConfig config) {
		systemConfigRepository.save(config);
	}
	
	
}
